<!--{include manage/header}-->
<body>
<form method="POST" action="./index.php?file=sysgroup&action=edit&submit=true" name="theForm" id="theForm">
<div class="list-div">
<div style="background: none repeat scroll 0% 0% rgb(239, 239, 239); padding: 5px; text-align: right;">
	<input name="checkall" onclick="history.go(-1);" value="返回列表" type="button">&nbsp;&nbsp;&nbsp;
	<input name="checkall" onclick="$('#theForm').checkCheckboxes();" value="全选" type="button">&nbsp;&nbsp;&nbsp;
	<input name="checkall" onclick="$('#theForm').unCheckCheckboxes();" value="取消" type="button">&nbsp;&nbsp;&nbsp;
	<input value=" 重置 " class="button" type="reset">&nbsp;&nbsp;&nbsp;
	<input name="Submit" value=" 保存 " class="button" type="submit">&nbsp;&nbsp;&nbsp;
</div>

<div style="height: 575px;" id="scrollIframe">
<table width="100%">
  <tbody><tr>
    <td class="label">角色名</td>
    <td><input type="hidden" name="id"  value="{$group['id']}"/>
      <input gtbfieldid="1" name="group[title]" maxlength="20" size="34" class="easyui-validatebox validatebox-text" required="true" missingmessage="角色名不能为空" type="text" value="{$group['roleName']}"></td>
  </tr>
  <tr>
    <td class="label">角色描述</td>
    <td>
      <input gtbfieldid="2" name="group[describe]" maxlength="255" size="34" class="easyui-validatebox validatebox-text" required="true" missingmessage="请输入角色描述" type="text" value="{$group['describe']}"></td>
  </tr>
</tbody></table><br>
<table id="list-table" cellspacing="1">
 <tbody>
 <!--{loop $dataArray $r}-->
 <tr>
  <td class="first-cell" style="background: none repeat scroll 0% 0% rgb(244, 250, 250);" valign="top" width="18%">
    <input name="moduleid[]" value="{$r['id']}" id="module_{$r['id']}" onclick="sysuser.GroupChangueModule(this);" type="checkbox"  ${Cheacked($r['id'],$group['role'])}>{$r['text']}</td>
  <td style="background: none repeat scroll 0% 0% rgb(251, 236, 136);">
    <div style="width: 600px; float: left;">
	<!--{loop $r['Children'] $d}-->
      <label><input name="moduleid[]" value="{$d['id']}" class="pid_{$r['id']} rele_{$d['pid']}" relevance="{$d['pid']}" pid="{$r['id']}" id="module_{$d['id']}" onclick="sysuser.GroupChangueChildren(this);" type="checkbox" ${Cheacked($d['id'],$group['role'])}>{$d['name']}</label>
	<!--{/loop}-->
    </div>
  </td>
  </tr>
 <!--{/loop}-->

</tbody></table>
</div>
</div>
</form>
<script type="text/javascript" src="../static/js/sysuser.js"></script>
<script type="text/javascript">
$("#scrollIframe").css({
	height: $.browser.msie ? pageHeight()-70 : pageHeight()-75
});
$('#theForm').form({
    onSubmit:function(){
        return $(this).form('validate');
    },
    success:function(data){
    	JSONData = $.evalJSON(data);
    	if(JSONData.status=="success"){
    		window.location.href="index.php?file=sysgroup&action=listGroup&nocache="+Math.random();
    	}else{
    		$.messager.alert('提示信息', JSONData.msg );
    	}
    }
});
</script>


</body></html>